import { ThemeConfig, theme } from 'antd';
import { getAlphaColor } from 'antd/es/theme/themes/default/colorAlgorithm';
import {
  colorText,
  colorTextBase,
  colorTextSecondary,
  colorTextTertiary,
} from './theme-color';

const token = theme.getDesignToken();
const fontSize = 12;
const fontFamily = `PingFangSC,${token.fontFamily}`;

export const themeConfig: ThemeConfig = {
  token: {
    borderRadius: 2,
    fontFamily,
    colorTextBase,
    colorText,
    colorTextSecondary,
    colorTextTertiary,
  },
  components: {
    Button: { fontSize },
    Table: { fontSize },
    Layout: { headerBg: '#fff', headerHeight: 52 },
    Form: {
      labelColor: token.colorTextDescription,
      itemMarginBottom: token.marginSM,
    },
  },
};
